package it.side.messaging.client;

/**
 * Filter based on receiver
 * @author Simone Masoni
 */
public class ReceiverMessageFilter implements MessageFilter {

	private String to;
	
	public ReceiverMessageFilter(String to) {
		super();
		this.to = to;
	}

	@Override
	public boolean accept(Message message) {
		return (message.isBroadcast() || to.equalsIgnoreCase(message.getTo()));
	}

}
